package org.restql.db;

import java.util.List;

public class Utility {

	public static String commas(List<String> list) {
		String compStr = "";
		for (String item : list) {
			compStr += item + ",";
		}
		return compStr.substring(0, compStr.length() - 1);
	}

	public static String ands(List<String> list) {
		String compStr = "";
		for (String item : list) {
			compStr += item + " and ";
		}
		return compStr.substring(0, compStr.length() - 5);
	}

	public static String commasAndQuotes(List<String> list) {
		String compStr = "";
		for (String item : list) {
			compStr += "'" + item + "',";
		}
		return compStr.substring(0, compStr.length() - 1);
	}

}
